import React, { useEffect, useState, useRef } from 'react';
import { View, Button, Input, Text } from '@tarojs/components'
import './index.scss';
export default (props) => {
  const {
    onChange,
    require = true,
    title,
    value,
    placeholder = '--',
  } = props;
  return <View className='FormCondition_input_item'>
    <View className='FormCondition_input_left'>
      {require && <Text className='FormCondition_input_leftRequire'>
        *
      </Text>}
      {title}

    </View>
    <View className='FormCondition_input_right'>
      <Input {...props} className='FormCondition_input_box' placeholder={placeholder} value={value} onInput={(e) => {
        onChange(e.target.value)
      }}></Input>
    </View>
  </View>
};
